class Solution1 {
    public int removeDuplicates(int[] nums) {
        int count = 1;
        int flg = 0;
        for(int i = 1; i<nums.length-flg;i++){
            if(nums[i] == nums[i-1]){
                count++;
                if(count >= 3){
                    for(int j = i; j<nums.length-1;j++){
                        nums[j] = nums[j+1];
                    }
                    flg++;
                    i--;
                }
            }else{
                count = 1;
            }
        }
        return nums.length - flg;
    }
}
class Solution {
    public int climbStairs(int n) {
        if(n<=2)
            return n;
        else{
            int fib1 = 1;
            int fib2 = 2;
            int fib3 = -1;
            while(n>=3){
                fib3 = fib1 + fib2;
                fib1 = fib2;
                fib2 = fib3;
                n--;
            }
            return fib3;
        }
    }
}
public class Test {
}
